package group3_project5;

// Brendan Ryan 
// Alex Hurtt
// Andrew Kunkel 

import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;


public class project5 {

 
public static void main(String[] args) {
ArrayList<String> list1 = new ArrayList<String>();
list1.add("GREG");
list1.add("CRAIG");
list1.add("DAVID");
list1.add("BEHVEAN");
list1.add("SCOTT");
ArrayList<String> list2 = new ArrayList<String>();
list2.add("KIM");
list2.add("BEN");
list2.add("TIM");
list2.add("SCOTT");
list2.add("GARY");
HashSet h1 = new HashSet();
HashMap hm1 = new HashMap();
hm1.put("GREG","27");
hm1.put("CRAIG","40");
hm1.put("DAVID","42");
hm1.put("BEHVEAN","45");
hm1.put("SCOTT","50");
HashMap hm2 = new HashMap();
hm2.put("KIM","40");
hm2.put("BEN","32");
hm2.put("TIM","50");
hm2.put("SCOTT","33");
hm2.put("GARY","70");
HashMap hm3 = new HashMap();
hm3.putAll(hm1);
hm3.putAll(hm2);
System.out.println(hm3.keySet() + hm3.values().toString());
 
hm3.putAll(hm1);
Iterator it111 = hm3.keySet().iterator();
Iterator it222 = hm2.keySet().iterator();
 
while(it222.hasNext())
{
if (hm3.keySet().contains(it222.next()))
{
System.out.println(it222.toString());
String tmp = hm3.keySet()
}
//it222.
}
 
 
 
 
h1.addAll(list1);
h1.addAll(list2);
Iterator itr1 = h1.iterator();
System.out.print("[");
while(itr1.hasNext())
{
System.out.print(itr1.next());
if(itr1.hasNext()){
System.out.print(", ");
}
}
System.out.println("]");
 
HashSet h2 = new HashSet();
h2.addAll(list1);
h2.retainAll(list2);
Iterator itr2 = h2.iterator();
while (itr2.hasNext())
System.out.print(itr2.next());
 
HashSet h3 = new HashSet();
h3.addAll(h1);
h3.removeAll(h2);
Iterator itr3 = h3.iterator();
while(itr3.hasNext())
System.out.print(itr3.next());
 
//System.out.println(h3);

}

}
